# To change this template, choose Tools | Templates
# and open the template in the editor.

import pygame
import random

class Button():
    def __init__(self,loc,text,fcol = (0,0,0),bcol = (225,225,225)):
        font = pygame.font.Font(None,46)
        self.loc = loc
        self.surf = font.render(text,1,fcol)
        self.rect = self.surf.get_rect(center = loc).inflate(16,16)
        self.rect.left = 0
        self.bCol = bcol
        self.fCol = fcol
    def setText(self,text):
        font = pygame.font.Font(None,46)
        self.surf = font.render(text,1,self.fCol)
        self.rect = self.surf.get_rect(center = self.loc).inflate(16,16)
        self.rect.left = 0
    def checkClick(self,clickLoc):
        if self.rect.collidepoint(clickLoc):
            return True
        else:
            return False

    def draw(self,surf):
        pygame.draw.rect(surf,self.bCol,self.rect)
        pygame.draw.rect(surf,(0,0,0),self.rect,1)
        surf.blit(self.surf,self.surf.get_rect(center = self.rect.center).topleft)


if __name__ == "__main__":
    list = [1,2,3,4,5]
    list2 = [1,2,3,4,5]
    list.sort(reverse = True)
    print list,list2